import { createHashRouter } from "react-router-dom"
import Login from "../pages/Login"
import AutoLogin from "../pages/Login/Autologin"
import PageLayout from "@/pages/PageLayout"
import Enterprise from "@/pages/trader/Enterprise"
import SearchResult from "@/pages/trader/SearchResult"
import Search from "@/pages/trader/Search"
import UserControl from "@/pages/setting/usercontrol/UserControl"
import UserControlList from "@/pages/setting/usercontrol/List"
import UserControlNew from "@/pages/setting/usercontrol/New"
import Log from "@/pages/setting/Log"
import ChangePassword from "@/pages/setting/ChangePassword"
import Gongshangxinxi from "@/pages/warehouse/Gongshangxinxi"
import Maoyifengxian from "@/pages/warehouse/Maoyifengxian"
import Sikuheshihan from "@/pages/warehouse/Sikuheshihan"
import Biaoqianguanli from "@/pages/tally/Biaoqianguanli"
import Qiyefenqun from "@/pages/trader/Qiyefenqun"
import Shequpaiming from "@/pages/trader/Shequpaiming"
import Dashboard from "@/pages/Dashboard"
import Gongshangfengxianxinxi from "@/pages/warehouse/Gongshangfengxianxinxi"
const router = createHashRouter([
    {
        path: '',
        element: <PageLayout />,
        children: [
            {
                path: '',
                element: <Dashboard/>,
            },
            {
                path: '/search',
                element: <Search />,
            },
            {
                path: '/searchResult',
                element: <SearchResult />
            },
            {
                path: 'searchEnterprise',
                element: <Enterprise />,
            },
            {
                path: 'gongshangfengxianxinxi',
                element: <Gongshangfengxianxinxi />
            },
            {
                path: 'gongshangxinxi',
                element: <Gongshangxinxi />,
            },
            {
                path: 'maoyifengxian',
                element: <Maoyifengxian />,
            },
            {
                path: 'sikuheshihan',
                element: <Sikuheshihan />,
            },
            {
                path: 'biaoqianguanli',
                element: <Biaoqianguanli />,
            },
            {
                path: 'qiyefenqun',
                element: <Qiyefenqun/>
            },
            {
                path: 'shequpaiming',
                element: <Shequpaiming/>
            },
            {
                path: 'usercontrol',
                element: <UserControl />,
                children: [
                    {
                        path: '',
                        element: <UserControlList />
                    },
                    {
                        path: 'new',
                        element: <UserControlNew />
                    }
                ]
            },
            {
                path: 'log',
                element: <Log />
            },
            {
                path: 'changepassword',
                element: <ChangePassword />
            }
        ]
    },
    {
        path: 'login',
        element: <Login />
    },
    {
        path: 'autologin',
        element: <AutoLogin />
    }
])

export default router